##
# This is the default log4j configuration for distribution and CI tests.
##

# Note: logging at INFO or DEBUG will significantly impact throughput!
log4j.rootCategory=WARN, dest2

log4j.logger.com.bigdata=WARN
log4j.logger.com.bigdata.btree=WARN
log4j.logger.com.bigdata.counters.History=ERROR
log4j.logger.com.bigdata.counters.XMLUtility$MyHandler=ERROR
log4j.logger.com.bigdata.counters.query.CounterSetQuery=INFO
log4j.logger.com.bigdata.journal.CompactTask=INFO
log4j.logger.com.bigdata.relation.accesspath.BlockingBuffer=ERROR
log4j.logger.com.bigdata.rdf.load=INFO
log4j.logger.com.bigdata.rdf.store.DataLoader=INFO
log4j.logger.com.bigdata.resources.AsynchronousOverflowTask=INFO

log4j.logger.com.bigdata.rdf.sail.webapp.NanoSparqlServer=INFO

# This will only work if you have the slf4j bridge setup.
#log4j.org.eclipse.jetty.util.log.Log=INFO

# This can provide valuable information about open connections.
log4j.logger.com.bigdata.txLog=INFO

# HA related loggers (debugging only)
log4j.logger.com.bigdata.ha=INFO
#log4j.logger.com.bigdata.haLog=INFO
##log4j.logger.com.bigdata.rwstore=ALL
#log4j.logger.com.bigdata.journal=INFO
##log4j.logger.com.bigdata.journal.AbstractBufferStrategy=ALL
log4j.logger.com.bigdata.journal.jini.ha=INFO
##log4j.logger.com.bigdata.service.jini.lookup=ALL
log4j.logger.com.bigdata.quorum=INFO
log4j.logger.com.bigdata.quorum.zk=INFO
#log4j.logger.com.bigdata.quorum.quorumState=ALL,destPlain
##log4j.logger.com.bigdata.io.writecache=ALL

# dest2 includes the thread name and elapsed milliseconds.
# Note: %r is elapsed milliseconds.
# Note: %t is the thread name.
# See http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
#log4j.appender.dest2=org.apache.log4j.ConsoleAppender
log4j.appender.dest2=org.apache.log4j.RollingFileAppender
log4j.appender.dest2.File=<%= node['bigdata'][:log_dir] %>/HAJournalServer.log
log4j.appender.dest2.MaxFileSize=500MB
log4j.appender.dest2.MaxBackupIndex=20
log4j.appender.dest2.layout=org.apache.log4j.PatternLayout
log4j.appender.dest2.layout.ConversionPattern=%-5p: %r %d{ISO8601} %X{hostname} %X{serviceUUID} %X{taskname} %X{timestamp} %X{resources} %t %l: %m%n

## destPlain
#log4j.appender.destPlain=org.apache.log4j.ConsoleAppender
#log4j.appender.destPlain.layout=org.apache.log4j.PatternLayout
#log4j.appender.destPlain.layout.ConversionPattern=

## 
# Summary query evaluation log (tab delimited file).
#log4j.logger.com.bigdata.bop.engine.QueryLog=INFO,queryLog
log4j.additivity.com.bigdata.bop.engine.QueryLog=false
log4j.appender.queryLog=org.apache.log4j.FileAppender
log4j.appender.queryLog.Threshold=ALL
log4j.appender.queryLog.File=<%= node['bigdata'][:log_dir] %>/queryLog.csv
log4j.appender.queryLog.Append=true
# I find that it is nicer to have this unbuffered since you can see what
# is going on and to make sure that I have complete rule evaluation logs
# on shutdown.
log4j.appender.queryLog.BufferedIO=false
log4j.appender.queryLog.layout=org.apache.log4j.PatternLayout
log4j.appender.queryLog.layout.ConversionPattern=%m

## 
# BOp run state trace (tab delimited file).  Uncomment the next line to enable.
#log4j.logger.com.bigdata.bop.engine.RunState$TableLog=INFO,queryRunStateLog
log4j.additivity.com.bigdata.bop.engine.RunState$TableLog=false
log4j.appender.queryRunStateLog=org.apache.log4j.FileAppender
log4j.appender.queryRunStateLog.Threshold=ALL
log4j.appender.queryRunStateLog.File=<%= node['bigdata'][:log_dir] %>/queryRunState.log
log4j.appender.queryRunStateLog.Append=true
# I find that it is nicer to have this unbuffered since you can see what
# is going on and to make sure that I have complete rule evaluation logs
# on shutdown.
log4j.appender.queryRunStateLog.BufferedIO=false
log4j.appender.queryRunStateLog.layout=org.apache.log4j.PatternLayout
log4j.appender.queryRunStateLog.layout.ConversionPattern=%m
